package com.kotlinvben.repository

import com.kotlinvben.entity.Menu
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.stereotype.Repository

@Repository
interface MenuRepository : JpaRepository<Menu, Long> {
    fun findByPidIsNull(): List<Menu>
    fun findByPid(id: Long): List<Menu>
    fun existsByName(name: String): Boolean
    fun existsByPathAndIdNot(path: String, id: Long): Boolean
    fun existsByNameAndIdNot(name: String, id: Long): Boolean
}